#ifndef I2C_LIS_H
#define I2C_LIS_H

enum 
{

}I2CStatus;

/**MMA8452读写地址*/
#define LIS3DH_WRITE      0x30
#define LIS3DH_READ       0x31

/**通讯总线模式配置*/
#define LIS_SDA_OUT()       GPIOA->CRH &= 0xfff0ffff;GPIOA->CRH |= 0x00010000;//0101
#define LIS_SDA_IN()        GPIOA->CRH &= 0xfff0ffff;GPIOA->CRH |= 0x00080000;GPIOA->ODR |= 1<<12;//0100

/**通讯总线操作*/
#define LIS_SDA_HIGH()      GPIOA->ODR |= (1<<12);
#define LIS_SDA_LOW()       GPIOA->ODR &= ~(1<<12);
#define LIS_SCK_LOW()       GPIOA->ODR &= ~(1<<11);
#define LIS_SCK_HIGH()      GPIOA->ODR |= (1<<11);
#define LIS_SDA_READ()      ((GPIOA->IDR)&(1<<12))

void LIS3DH_WriteReg(INT8U Reg, INT8U *pData, INT8U Len);
void LIS3DH_ReadData(INT8U Reg, INT8U *Buff, INT8U Len);

#endif
